package com.kgc.novel.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;


/**
 * 会员折扣对象 book_discount
 * 
 * @author java81
 * @date 2023-05-09
 */
@Getter
@Setter
@NoArgsConstructor
@TableName(value = "book_discount")
@Api(tags = "会员折扣管理类")
public class BookDiscount
{
    private static final long serialVersionUID = 1L;

    /** 会员打折主键 */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private String id;

    /** 标题（7天包周） */
    @TableField(value = "title")
    @ApiParam("标题（7天包周）")
    private String title;

    /** 原价 */
    @TableField(value = "original_price")
    @ApiParam("原价")
    private BigDecimal originalPrice;

    /** 折扣 */
    @TableField(value = "discount")
    @ApiParam("折扣")
    private BigDecimal discount;

    /** 实际价格（折后价）9.9元/周；29.8元/月；39.8元/季 */
    @TableField(value = "reality_price")
    @ApiParam("实际价格")
    private BigDecimal realityPrice;

    /** 有效时间（以天为单位） */
    @TableField(value = "effective_time")
    @ApiParam("有效时间")
    private Long effectiveTime;

    /** 到期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "expire_time")
    @ApiParam("到期时间")
    private Date expireTime;

}
